home *** CD-ROM | disk | FTP | other *** search
- Path: crl.crl.com!not-for-mail
- From: dbridges@crl.com (Dick Bridges)
- Newsgroups: comp.lang.c++
- Subject: [Q] namespace #1
- Date: 4 Mar 1996 09:07:55 -0800
- Organization: CRL Network Services (415) 705-6060 [Login: guest]
- Message-ID: <4hf81b$aov@crl.crl.com>
- NNTP-Posting-Host: crl.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- #include <iostream.h>
-
- namespace foo
- {
- int Value = 43;
- };
-
- void main()
- {
- int Value = 65;
- using namespace foo;
- cout << Value << endl;
- }
-
- // QUESTIONS:
- // 1) Is this a valid program
- // 2) If so what is the expected output, if not what is the error
- // 3) What would be the result of using a using declaration instead
- // instead of a using directive
- //
- // NOTES:
- // 1) The Microsoft VC++ 4.0 compiler complains that Value is an
- // ambiguous symbol. Is this correct?
-
-